package com.comment.pojo.domain.logic.core;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Map;

import com.comment.config.dao.typeHandler.KV_LongInteger_Handler;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * 道具表(CoreProp)表实体类
 *
 * @author cxy
 * @since 2024-08-05 18:15:26
 */
@ApiModel("道具表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
@TableName(autoResultMap = true)
public class CoreProp extends Model<CoreProp> {// swagger2,mybatis-plus
    ///////////////////////////////////////////////////////////////////////////////////////////////////////// 生成实体字段
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("名字")
    private String name;

    @ApiModelProperty("类型")
    private Integer type;

    @ApiModelProperty("描述")
    private String intro;

    @ApiModelProperty("品质")
    private Integer quality;

    @ApiModelProperty("堆叠 0.无限堆叠 1.不能堆叠 >1.堆叠数量")
    private Long stack;

    @ApiModelProperty("售价")
    private String sellPrice;

    @ApiModelProperty("回收获得")
    @TableField(typeHandler = KV_LongInteger_Handler.class)
    private Map<Long, Integer> recoveryObtain;

    @ApiModelProperty("是否背包可直接使用")
    private Integer isUse;

    @ApiModelProperty("使用等级")
    private Integer useLv;

    private Integer useValueType;

    @ApiModelProperty("使用后获取物品")
    @TableField(typeHandler = KV_LongInteger_Handler.class)
    private Map<Long, Integer> useValue;

    @ApiModelProperty("攻击力")
    private Long attack;

    @ApiModelProperty("策略力")
    private Long magic;

    @ApiModelProperty("防御力")
    private Long defense;

    @ApiModelProperty("速度")
    private Long speed;

    @ApiModelProperty("统帅力")
    private Long command;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("英雄id")
    private Long heroId;

    @ApiModelProperty("技能id 0阶")
    private Long skillId;

    ///////////////////////////////////////////////////////////////////////////////////////////////////////// 序列化版本号
    @TableField(exist = false)
    private static final long serialVersionUID = 291812472749664384L;

    /////////////////////////////////////////////////////////////////////////////////////////////////////////// 获取主键值
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}

